<?php

namespace App\Module\Admin\Controller;

use App\Common\Controller\AbstractController;
use App\Module\Admin\Service\PayService;
use Hyperf\Di\Annotation\Inject;

class PayController extends AbstractController{

    /**
     * @Inject()
     * @var PayService $payService
     */
    private $payService;

    public function search(){
        $pay_id = $this->request->input("pay_id");
        $platform_trade_no = $this->request->input("platform_trade_no");
        $order_status = $this->request->input("order_status");
        $pagesize = $this->request->input("pagesize");

        return $this->response->json($this->payService->search($pay_id,$platform_trade_no,$order_status,$pagesize));
    }

    public function use(int $id){
        return $this->response->json($this->payService->use($id));
    }
}